package com.chenhao.springcloud.chenhaodatastructureservice.linkedlist;

/**
 * Description:
 *
 * @author chenhao
 * @date 2020/12/9 14:05
 */
public class Test {
    public static void main(String[] args) {
        LinkedList<Integer> linkedList = new LinkedList <>();
        for (int i=0;i<5;i++){
            linkedList.addFirst(i);
            System.out.println(linkedList);
        }
        linkedList.add(2,666);
        System.out.println(linkedList);
    }
}
